﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting;
using System.ComponentModel.Composition.Primitives;
using System.Linq;
using System.Text;
using Snowdreamist.ComponentModel.Plugin;

namespace Snowdreamist.ComponentModel.MEF
{
    public class MEFContractMetadata : ContractMetadata
    {
        public MEFContractMetadata(Guid id, string name)
            : this(id, name, null, CandidateMode.One, CreationPolicy.Any, null)
        {
        }

        public MEFContractMetadata(Guid id, Type type)
            : this(id, null, type, CandidateMode.One, CreationPolicy.Any, null)
        {
        }

        public MEFContractMetadata(Guid id, string name, Type type)
            : this(id, name, type, CandidateMode.One, CreationPolicy.Any, null)
        {
        }

        public MEFContractMetadata(Guid id, string name, Type type, CandidateMode mode, CreationPolicy policy, Type OwnerType)
            : base(id, name, type, mode, OwnerType)
        {
            this.CreationPolicy = policy;
        }

        public CreationPolicy CreationPolicy { get; private set; }
    }
}